#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	int n;
	cin >> n;
	float p = 1, q = 2;
	float sum;
	for(int i = 0; i < n; i++)
	{
		sum += q / p;
		q = q + p;
		p = q - p;
	}
	printf("%.4f", sum);
	return 0;
}
